<!-- 版本信息 -->
<template>
  <div class="home">
    <van-nav-bar title="版本信息" left-arrow @click-left="onClickLeft" />
    <div class="present">
        <span>当前版本</span>
        <span>{{versionsInfo.versions}}</span>
    </div>
    <div class="info">
        <p>版本信息</p>
        <p>{{versionsInfo.infomation}}</p>
    </div>
  </div>
</template>

<script>
import {GetVersion} from '../raxios/api'
export default {
  data() {
    return {
      versionsInfo:{}
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
  },
  created(){
    GetVersion().then(res=>{
      if(res.errCode == 0) {
        // console.log(res.data);
        this.versionsInfo = res.data
      }
    })
  }
};
</script>
 
<style lang="less" scoped>
.home{
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 99;
    overflow: scroll;
    background-color: #fff;
}
/deep/.van-nav-bar {
  background-color: #003399;
  height: 0.5rem;
  .van-nav-bar__title {
    color: #fff;
  }
  .van-icon {
    color: #fff;
    font-size: 0.2rem;
  }
}
.present {
    height: .4rem;
    line-height: .4rem;
    padding: 0 .1rem;
    display: flex;
    justify-content: space-between;
    background-color: #fff;
    color: #666;
    font-size: .16rem;
}
.info {
    height: .5rem;
    padding: .2rem .1rem;
    background-color: #fff;
    margin-top: .1rem;
    font-size: .16rem;
    p {
        &:nth-child(1){
            margin-bottom: .1rem;
        }
        &:nth-child(2){
            color: #999;
        }
    }
}
</style>